# coding:utf-8
# 作者：理想国真恵玩
import pandas as pd
import numpy as np
import matplotlib.pyplot as  plt

path = "../data/movie.csv"
df = pd.read_csv(path)

plt.figure(figsize=(20, 8), dpi=80)
plt.hist(df["Rating"].values, bins=20)
# 求出最大最小值
max_ = df["Rating"].max()
min_ = df["Rating"].min()

# 生成刻度列表
t1 = np.linspace(min_, max_, num=21)

# 修改刻度
plt.xticks(t1)

# 添加网格
plt.grid()
plt.show()
